Information processing device, information processing method, and robot apparatus

ABSTRACT

A robot device ( 1 ) has a central processing process (CPU) having a plurality of objects and adapted for carrying out control processing on the basis inter-object communication carried out between the objects, the central processing process controlling accesses by the plurality of objects to a shared memory shared by the plurality of objects and thus carrying out inter-object communication. Specifically, the central processing process generates pointers P 11,  P 12,  P 13,  P 21,  P 22  in accordance with accesses by the objects to predetermined areas M 1,  M 2  on a shared memory M, then measures the pointers by the corresponding number-of-reference measuring objects RO 1,  RO 2,  and controls the accesses in accordance with the number of pointers measured, thereby carrying out inter-object communication. This enables easy realization of smooth inter-process communication.

TECHNICAL FIELD

[0001] This invention relates to an information processing device and aninformation processing method for carrying out various processing usinga plurality of processes, and a robot device which has its motion or thelike determined by a plurality of processes.

BACKGROUND ART

[0002] In the case of carrying out communication (inter-processcommunication) between a plurality of distributed processes forexecuting tasks in real time, the proceeding status of the task isdifferent depending on the weight, priority, processing cycle and thelike of the processing of each process. For example, if the processingresult (data) of a process A which is executed at a high speed istransmitted from the process A to a process B which is executed at a lowspeed, the process B is filled with the received queues from the processA and the received queues overflow. Such a problem of overflowing queuesoccurs at various sites in a system operating in real time. In order toprevent this problem, handshaking between the processes must be carriedout by a certain technique. For example, the following three techniquesare proposed (Basics and Application of OS, A. S.Tannenbaum, Toppan,p.464):

[0003] (1) blocking transmission;

[0004] (2) non-blocking transmission which involves copying; and

[0005] (3) non-blocking transmission which involves interrupt.

[0006] These three techniques (1) to (3) are proposed. The blockingtransmission (1) is a transmission technique in which The transmittingside waits until transmission is completed and the queues at destinationare emptied. The non-blocking transmission which involves copying (2) isa transmission technique in which data is copied into an area of thesystem so as to let the process on the transmitting side proceed. Thenon-blocking transmission which involves interrupt (3) is a transmissiontechnique in which writing to a transmission buffer is carried out byinterrupt processing.

[0007] Meanwhile, though it can be said that the above-describedblocking transmission (1) is a safe and secure transmission technique,this technique is not practical because when freely changing theconnection of software or process as a component (for example,object-oriented software, hereinafter referred to as object), a deadlockmay easily occur depending on the way of connection.

[0008] Object-oriented software is constituted, for example, in apet-like robot device or the like. A pet-like robot device makes, forexample, gestures similar to those of a certain animal in accordancewith various processing (for example, data communication) throughinter-object communication (or inter-process communication).

[0009] The above-described non-blocking transmission which involvescopying (2) is less efficient because it repeats redundant copying. Forexample, in inter-object communication where communications (orconnections) between a plurality of objects and a plurality of objectsare permitted, an increase in the number of connections causes anincrease in the number of times of copying and hence the number ofmemories used as buffers.

[0010] In the above-described non-blocking transmission which involvesinterrupt (3), no redundant copying from the transmission buffer iscarried out, thus saving the time for carrying out the subsequentprocessing. However, since the interrupt notifies the user of theinformation that the transmission buffer has been made writable again,it becomes more difficult for the user to handle the programming.Therefore, the non-blocking transmission which involves interrupt (3) isconsidered to have more problems than advantages.

[0011] Thus, it is desired to realize the elimination of redundantcopying from the transmission buffer as in the non-blocking transmissionwhich involves interrupt (3) while solving the problems of thistechnique so that the user will not feel the handling troublesome.

DISCLOSURE OF THE INVENTION

[0012] Thus, in view of the foregoing status of the art, it is an objectof the present invention to provide an information processing device, aninformation processing method, and a robot device which can easilyrealize smooth inter-process communication.

[0013] An information processing device according to the presentinvention comprises control means having a plurality of informationprocessing processes and adapted for carrying out control processingbased on inter-process communication carried out between the informationprocessing processes, the control means controlling accesses by theplurality of information processing processes to a shared memory sharedby the plurality of information processing processes and thus carryingout inter-process communication.

[0014] In the information processing device having such a structure, theinformation processing processes, each of which independently executesprocessing, share data on the shared memory and thus execute variousprocessing.

[0015] An information processing method according to the presentinvention has a plurality of information processing processes and isadapted for carrying out control processing based on inter-processcommunication carried out between the information processing processes,the information processing method comprising controlling accesses by theplurality of information processing processes to a shared memory sharedby the plurality of information processing processes and thus carryingout inter-process communication.

[0016] In such an information processing method, the informationprocessing processes, each of which independently executes processing,share data on the shared memory and thus execute various processing.

[0017] A robot device according to the present invention comprisesoutput means for expressing a motion, and control means having aplurality of information processing processes and adapted for carryingout control processing of the output means based on inter-processcommunication carried out between the information processing processes,the control means controlling accesses by the plurality of informationprocessing processes to a shared memory shared by the plurality ofinformation processing processes and thus carrying out inter-processcommunication.

[0018] In the robot device having such a structure, the informationprocessing processes, each of which independently executes processing,share data on the shared memory and thus execute the control processingof the output means.

[0019] That is, in the information processing device according to thepresent invention, as control means having a plurality of informationprocessing processes and adapted for carrying out control processingbased on inter-process communication carried out between the informationprocessing processes controls accesses by the plurality of informationprocessing processes to a shared memory shared by the plurality ofinformation processing processes and thus carries out inter-processcommunication, the information processing processes, each of whichindependently executes processing, can share data on the shared memoryand thus execute the various processing.

[0020] Morever, in the information processing method according to thepresent invention, as a plurality of information processing processesare provided, then control processing is carried out based oninter-process communication carried out between the informationprocessing processes, then accesses by the plurality of informationprocessing processes to a shared memory shared by the plurality ofinformation processing processes are controlled to carry outinter-process communication, the information processing processes, eachof which independently executes processing, can share data on the sharedmemory and thus execute the various processing.

[0021] Furthermore, in the robot device according to the presentinvention, as control means having a plurality of information processingprocesses and adapted for carrying out control processing of outputmeans based on inter-process communication carried out between theinformation processing processes controls accesses by the plurality ofinformation processing processes to a shared memory shared by theplurality of information processing processes and thus carries outinter-process communication, the information processing processes, eachof which independently executes processing, can share data on the sharedmemory and thus execute the control processing of the output means.

BRIEF DESCRIPTION OF THE DRAWINGS

[0022]FIG. 1 is a perspective view showing the structure of a robotdevice according to an embodiment of the present invention.

[0023]FIG. 2 is a block diagram showing the structure of the robotdevice.

[0024]FIG. 3 is a diagram showing the software structure of afour-legged type.

[0025]FIG. 4 is a diagram showing the software structure of a wheeledtype.

[0026]FIG. 5 is a state transition view showing changes in the postureof a four-legged type.

[0027]FIG. 6 is a chart showing the relation between input and state.

[0028]FIG. 7 is a flowchart showing the processing procedure of a designrobot.

[0029]FIG. 8 is a chart showing the description of a design file.

[0030]FIG. 9 is a chart showing connection information.

[0031]FIG. 10 is a time chart showing the operations of an objectmanager, a virtual robot and a design robot after boot.

[0032]FIG. 11 is a time chart showing the operations of an objectmanager, a virtual robot and a design robot at Plug-In or Plug-Out.

[0033]FIG. 12 is a diagram showing the relation between an observer anda subject.

[0034]FIG. 13 is a diagram showing the relation between observers and asubject in a multi-observer environment.

[0035]FIG. 14 is a diagram showing the relation between an observer andsubjects in a multi-subject environment.

[0036]FIG. 15 is a diagram showing the relation between an objectmanager, an observer and a subject.

[0037]FIG. 16 is a time chart showing the operation of an object managerin the case where connection information is received.

[0038]FIG. 17 is a time chart showing the sequence after DoStart.

[0039]FIG. 18 is a time chart showing the sequence at Plug-In, Plug-Out,and state change.

[0040]FIG. 19 is a view used for explaining the management of a sharedmemory by the number of references determined by a number-of-referencemeasuring object which uses a pointer.

[0041]FIG. 20 is a view used for explaining the generation of a pointer.

[0042]FIG. 21 is a view used for explaining the extinction of a pointer.

[0043]FIG. 22 is a view used for explaining the behavior of a pointerwhen copying data.

[0044]FIG. 23 is a view used for explaining the behavior of a pointerwhen rewriting data.

[0045]FIG. 24 is a view used for explaining the processing when startinginter-object communication between objects having different memoryspaces.

[0046]FIG. 25 is a view used for explaining the processing when endinginter-object communication between object having different memoryspaces.

[0047]FIG. 26 is a view used for explaining the processing whensubletting data to a third object.

[0048]FIG. 27 is a view used for explaining the data transmissionprocessing in the case where there are a plurality of objects on thetransmitting side.

[0049]FIG. 28 is a view showing a more specific example of the robotdevice.

BEST MODE FOR CARRYING OUT THE INVENTION

[0050] An embodiment of the present invention will now be described indetail with reference to the drawings. In this embodiment, the presentinvention is applied to a pet-like robot device in which object-orientedsoftware is constructed. The pet-like robot device makes, for example,gestures similar to those of a certain animal in accordance with variousprocessing (for example, data communication) through inter-objectcommunication (or inter-process communication). It should be noted thatthis invention is not limited to the pet-like robot device and can beapplied to other devices within the scope of this invention. Thestructure of the robot device will be first described and then essentialparts of this invention will be described in detail.

[0051] (1) Structure of Embodiment

[0052] (1-1) Overall Structure

[0053] A robot device 1 is a so-called pet-like robot device which has adog-like shape as a whole and can walk with four legs, as shown inFIG. 1. That is, the robot device 1 includes a moving unit 3 mounted ona body 2, and the body 2 is constituted by a head part 2A and a trunkpart 2B.

[0054] The head part 2A has arranged thereon a microphone 4, a touchsensor 5, a television camera 6 capable of realizing stereoscopicvision, a remote-controlled infrared receiving portion 7 and the like,and can acquire various information by using these parts. The head part2A also has an image display portion 9 and a speaker 10 arranged thereonand can output various information. However, the structure of the headpart 2A is not limited to such a structure. For example, the imagedisplay portion 9 may be constituted by an LED (light-emitting diode) soas to give expressions.

[0055] The trunk part 2B has an operator 11 arranged on its back portionand also has an antenna 12 arranged at a site corresponding to the tail,so that the operation by the user can be detected via the operator 11and the antenna 12. The trunk part 2B also has a slot so that an IC cardis loaded into the slot to enable execution of version up of thesoftware and the like.

[0056] Moreover, a controller 15 for processing various informationinputted and outputted via the head part 2A and operation information ofthe operator 11 and the like, a power-supply unit 14 for supplying powerto each part, and a communication unit 16 for transmitting and receivingvarious information via the antenna 12 are arranged on the trunk part2B, and a battery 17 is arranged on the lower part thereof.

[0057] On the other hand, the moving unit 3 is formed by arranging fourlegs, each of which has an actuator and an angle detection sensor at asite corresponding to the joint. The moving unit 3 is connected to thebody 2 by a serial bus and operates under the control of the body 2.Thus, the robot device 1 can move by four-legged walking.

[0058] Moreover, the rear legs can be detached from the body 2. In therobot device 1, a moving unit having wheels can be attached instead ofthe rear legs. Thus, the form of this robot device 1 can be changedbetween the four-legged moving form (hereinafter referred to asfour-legged type) and the wheeled moving form (hereinafter referred toas wheeled type) in accordance with the preference of the user.

[0059]FIG. 2 is a block diagram showing the structure of this robotdevice 1. In the robot device 1, a program medium 20 having a processingprogram recorded thereon is connected to a central processing unit 22via a peripheral unit 21, and the central processing unit 22 executesthe processing procedure recorded on the program medium 20. The centralprocessing unit 22 is also connected with robot device components 24,25, 26, which are the actuators and sensors of the moving unit 3, thetelevision camera 6, the operator 11 and the like via the peripheralunit 21, and can thus control the overall operation.

[0060] Similarly, the central processing unit 22 is connected with aone-chip microcomputer 27 for power control which constitutes thepower-supply unit 14, via the peripheral unit 21, and controls theoperation of the one-chip microprocessor 27 to supply power to the wholebody from the battery 17, and in a power-saving mode, to supply power tothe whole body from a button battery 29 instead of the battery 17.

[0061] As will be described later in detail, the central processing unit22 has the function of control means which has a plurality ofinformation processing processes (objects) and is adapted for carryingout control processing based on inter-process communication(inter-object communication) carried out between the informationprocessing processes (objects), and which controls accesses by theplurality of information processing processes (objects) to a sharedmemory shared by the plurality of information processing processes(objects) and thus carries out inter-process communication (inter-objectcommunication).

[0062] (1-2) Software Structure

[0063]FIG. 3 is a diagram showing, as layers, the software structure ofthe robot device 1 of the four-legged type. FIG. 4 is a diagram showingthe software structure of the wheeled type in comparison with FIG. 3. Inthese software structures, the lowermost layer is a device driver layer,where various device drivers are arranged. The device drivers carry outinput/output of various information from/to the sensors and actuators ofthe moving unit 3 and the various robot device components arranged onthe head part 2A and the like, and have software objects for processingsuch information.

[0064] Of these device drivers, a battery manager device driver (batterymanager DD) detects the remaining power of the battery 17 through datacommunication with the one-chip microcomputer 27 of the power-supplyunit 14, and periodically notifies upper-layer robot system software ofthe detected remaining power. The battery manager device driver alsomanages the clock of the central processing unit 22 or the like, thenreduces the frequency of the clock in accordance with an instructionfrom the robot system software and stops the operation of unnecessarydevices, thus reducing the overall power consumption.

[0065] A robot serial bus device driver (robot serial bus DD) takessensor information and the like of the moving unit 3 connected to theserail bus arranged in the body 2 through data communication withhardware for master control of the serial bus, and notifies theupper-layer robot system software of the sensor information and thelike. Moreover, the robot serial bus device driver sends control data ofthe actuator, audio signals and the like outputted from the robot systemsoftware, to the respective devices.

[0066] In start-up of the system, the robot serial bus device driverdetects a change (addition or deletion) of a device connected to theserial bus. Furthermore, the robot serial bus device driver takesinformation proper to the device related to this change and thus outputsinformation indicating the current form of the robot device 1 to therobot system software.

[0067] The robot system software is arranged on the upper layer than thedevice driver layer. The robot system software is constituted bysoftware objects such as a virtual robot, a design robot, a powermanager, and an object manager.

[0068] Of these software objects, the virtual robot converts data of aformat proper to each device to a common formal of the robot device andthen transmits and receives the data, in data communication with therobot serial bus device driver. Specifically, for example, with respectto motor control data, a sensor output of a potentiometer in a formatproper to the device is expressed by 10-bit data resulting fromanalog-digital conversion, whereas the virtual robot converts the dataof this expression to data such that the lowest one bit indicates 0.001degrees and outputs the data in a common format in the robot device 1.Moreover, in addition to such transmission/reception of format-converteddata, the virtual robot outputs image data acquired by, for example, thetelevision camera 6, to the upper software.

[0069] The virtual robot also receives information indicating thecurrent form of the robot device 1 from the robot serial bus devicedriver and put the information together. Thus, the virtual robot managesconnection information (CPC (configurable physical component) connectioninformation) indicating which robot component is connected in what orderin the whole robot device 1, and notifies the design robot of thisconnection information (CPC connection information).

[0070] If a change is made in a device connected to the serial bus, thevirtual robot receives a notification from the robot serial bus devicedriver of the device driver layer and notifies the design robot.

[0071] The design robot receives the connection information (CPCconnection information) from the virtual robot, then sequentiallycompares the received connection information with pre-recordedconnection template information, and thus selects a template suitablefor the current form of the robot device 1. Moreover, in accordance withthe selected template, the design robot instructs the object manager toupdate form-dependent software on the upper layer to form-dependentsoftware suitable for the current form.

[0072] In this embodiment, the connection template information isdescribed as design data in a design file.

[0073] In accordance with the instruction from the design robot, theobject manager updates the form-dependent software to form-dependentsoftware suitable for the current form, using the information relatingto objects and connection of the respective objects sent from the designrobot. Specifically, the object manager give instructions to stop theoperation, cancel the connection of inter-object communication, demolishthe object, and open the resource, with respect to all the objectsconstituting the form-dependent software. The object manager givesfurther instructions to load newly required objects, initialize theobjects, construct connection for inter-object communication, and startup these objects. The connection between objects means the connectionfor transmitting and receiving data between the objects. This inventionrelates to such transmission and reception of data between the objects,and as will be described later in detail, this invention realizesinter-object communication by causing the objects to share data on ashared memory via a management object.

[0074] The power manager communicates data with the battery managerdevice driver, and in accordance with the instruction from the softwareof the upper layer (form-independent software or form-dependentsoftware), the power manager instructs the battery manager device driverto switch the clock and to stop the operation of the object.

[0075] The form-dependent software is arranged on the upper layer thanthe robot system software, and the form-independent software is arrangedon the further upper layer. The form-dependent software is the softwarewhich is changed in accordance with the form of the robot device 1, andthe form-independent software is the upper software of the robot device1 which is fixed irrespective of the form of the robot device 1.Therefore, various objects depending on the form of the robot device 1exist in the form-dependent software. In this embodiment, the softwaresuitable for the form of the four-legged type and the form of thewheeled type can be easily constituted by changing the form-dependentsoftware.

[0076] Specifically, in The four-legged type, the form-dependentsoftware (FIG. 3) is constituted by objects including a commandconverter, a motion network, a motion replay, a walking patterngenerator, and a vision, as the objects related to the moving unit 3.

[0077] The command converter converts a command from theform-independent software which is independent of the form, to a commandsuitable for the form of the robot device 1. That is, when a commandwhich give an instruction to take a posture to sleep, rest, wake up, ormove (command Sleep, Rest, Wakeup or Move) is inputted from theform-independent software as a command related to the moving unit 3, thecommand converter in the four-legged type converts the command to acommand which gives an instruction to take a posture of sleeping,sitting, standing, or walking (command Sleeping, Sitting, Standing orWalking).

[0078] The motion network starts a method (entry) of an objectcorresponding to an arrow shown in the transition view of FIG. 5, inaccordance with the command indicating the posture outputted from thecommand converter. That is, if a command for walking is inputted in thesleeping state, the corresponding entries of the motion replay objectare sequentially started so that the posture is sequentially changed tositting, standing and walking. In this case, when the ultimate walkingstate is reached, an entry of the walking pattern generatorcorresponding to the self-loop indicating this state is started.

[0079] The motion replay outputs joint angle command values for thecorresponding posture changes by starting entries of the motion network.Specifically, the motion replay holds registered discrete joint anglecommand values as key data and outputs a series of angle command valuesby interpolation processing using the key data.

[0080] The walking pattern generator calculates and outputs each jointangle command value so as to move in a direction designated by theform-independent software.

[0081] The vision is, for example, an object for image processing, andcarries out processing to receive image data acquired by the televisioncamera 6 from the virtual robot object. Thus, the vision identifies, forexample, a red object, and detects and outputs the position and apparentsize of the red object with reference to the robot device 1.

[0082] On the other hand, in the wheeled type, the form-dependentsoftware (FIG. 4) is constituted by objects including a vision objectwhich is common to this wheeled type and the four-legged type, and acommand converter, a motion commander, a motion replay 2, and a wheelpattern generator which are specific to the wheeled type, as the objectsrelated to the moving unit 3.

[0083] Of these objects, the command converter converts a command fromthe form-independent software which is independent of the form, to acommand suitable for the form of the robot device 1, similarly to thecommand converter in the four-legged type. In this case, since the robotdevice 1 is of the wheeled type, the command converter converts commandswhich give instructions to take postures to sleep, rest, wake up, andmove (commands Sleep, Rest, Wakeup and Move), to commands which giveinstructions to take postures of sleeping, resting, being ready, andgoing (commands Sleeping, Rest, Ready and Go).

[0084] The motion commander receives the output from the commandconverter and generates a joint angle command value associated with awheel control command. That is, when the command Sleeping is inputted,the motion commander sets the joint angle command value to neutral. Inthe neutral state, neither driving nor braking of the motor is carriedout. Therefore, the two arms constituting the moving unit are kepthanging down and the wheels are held in a stop state.

[0085] When the command Rest is inputted, the motion commander generatesa joint angle command value such that the two arms are bent 90 degreesat the elbow parts and held out forward while the face part of the headpart 2A faces the front. The wheels are kept stopped.

[0086] When the command Ready is inputted, the motion commandergenerates a joint angle command value such that the two arms arestretched out forward while the face part of the head part 2A faces thefront. In this case, too, the wheels are kept stopped. When the commandGo is inputted, the motion commander generates a command value such thatthe wheels rotate to move forward while the two arms are held similarlyto the Ready state.

[0087] The motion replay 2 controls the operation of the parts otherthan the wheels (for example, the operation of the two arms) withrespect to a motion proper to the wheeled type, in accordance with theinstruction from the motion commander. The wheel pattern generatorgenerates wheel control information under the control of the motioncommander.

[0088] The form-independent software is the software which isindependent of the form of the robot device 1 and has a form settingobject or the like. The form setting object receives information whichis independent of the form of the robot device 1 from the form-dependentsoftware, and by using this information, outputs the commands (Sleep,etc.) indicating the above-described postures of the robot device 1which are independent of the form of the robot device 1, to theform-dependent software.

[0089] For example, if no red object is detected for one minute or moreon the basis of the presence/absence of a red object and its positioninformation sent from the vision object, a command is issued such thatthe Sleep state is maintained as it is, the Rest state is shifted to theSleep state, the Wakeup state is shifted to the Rest state, and the Movestate is shifted to the Wakeup state, as shown in FIG. 6.

[0090] On the other hand, if a red object with a size smaller than apredetermined value (not more than a set value 10 of the robot device)is detected and is kept detected for 10 seconds or more, a command isissued such that the Sleep state is shifted to the Rest state, the Reststate is shifted to the Wakeup state, the Wakeup state is shifted to theMove state, and the Move state is continued as it is.

[0091] If a red object with a size not less than a predetermined valueis detected, a command is issued such that the Sleep state is shifted tothe Wakeup state, the Rest and Wakeup states are shifted to the Movestate, and the Move state is continued as it is.

[0092] Thus, in the robot device 1, the uppermost software is formed tobe independent of the form and the form-independent software transmitsand receives data in the format independent of the form. Therefore, inthe robot device 1, only the form-dependent software, which is dependenton the form, is changed in accordance with the form, thus enabling easychange of software in accordance with the form.

[0093] (1-3) Change of Form-Dependent Software

[0094] In the robot device 1, the form-dependent software is updated bythe processing at the object manager in accordance with an instructionfrom the design robot. In this embodiment, the form-dependent softwareis updated by constructing the reconnection for loading, unloading, andinter-object communication of the objects constituting theform-dependent software.

[0095] Therefore, the design robot receives a notification of connectioninformation (CPC connection information) specifying the form of therobot device 1 from the virtual robot. On the basis of the connectioninformation (CPC connection information), the design robot instructs theobject manager to update the form-dependent software and providesnecessary information to the object manager.

[0096] The virtual robot acquires information of each device connectedto the serial bus via the robot serial bus device driver on the lowerlayer, then uses this information to prepare connection information (CPCconnection information) and sends the connection information to thedesign robot.

[0097] Therefore, in the robot device 1, predetermined information isrecorded into the memory of each robot component, and the information ofthe device connected to the serial bus in the virtual robot can beacquired together with its position information through datacommunication carried out via the robot serial bus device driver.

[0098] In the robot device 1, the television camera, the speaker, themicrophone, the various actuators, the sensors and the like are thebasic constituent elements (CPC primitives) and a plurality ofcombinations of these basic constituent elements set in a link stateconstitute respective components (CPC models). For example, one leg as acomponent is constituted by a plurality of basic constituent elementsconsisting of three motors and one switch in a specific link state.

[0099] In the robot device 1, proper identification data are allocatedto the respective components so that the respective constituent elementsconnected to the serial bus can be specified by using the identificationdata. The identification data includes the ID of the factory where thecomponent was manufactured and the ID corresponding to the serialnumber. Moreover, corresponding to this identification data, theinformation of each constituent element and the position information ofeach constituent element in the component are set by link information ofeach constituent element in the component and attribute information ofeach constituent element, and such information is held in the memory ofeach component together with the identification data of each component.In this embodiment, if the component has a small memory capacity, onlythe identification data is recorded in the memory of each component, andthe information of the constituent elements and the position informationof the constituent elements in the component are held in the body 2.

[0100] At the start-up of the system, or when the device is changed, thevirtual robot sequentially traces the serial bus of the tree structurein accordance with the identification data, the position information andthe like sent from the robot serial bus device driver, then preparesconnection information (CPC connection information) by using therespective basic constituent elements (CPC primitives) and the datastructure representing the order of connection of the respectiveconstituent elements, and notifies the design robot of the connectioninformation. In this case, the connection information (CPC connectioninformation) sent by the virtual robot is constituted by constituentelement information (CPC primitive location information) correspondingto the form.

[0101] The design robot refers to the design file on the basis of theconnection information (CPC connection information) sent from thevirtual robot and thus selects a connection template (that is, a labelwhich will be described later) corresponding to the current form of therobot device 1. Moreover, in accordance with the selected template, thedesign robot instructs the object manager to update the form-dependentsoftware to form-dependent software suitable for the current form.

[0102] The design file includes description of the text data format, inwhich a group of constituent element information (CPC primitive locationinformation) of each component is described with a label appendedthereto, for each form of the robot device 1. The constituent elementinformation (CPC primitive location information includes the basicconstituent elements (CPC primitives) of each component and the positioninformation (CPC coordinate locator) of each constituent element. Ofsuch information, the position information (CPC coordinate locator) isthe coordinate from a reference position set for the robot device 1. Thecoordinate is represented by a general link coordinate system and isconstructed by cascade connection of a rotation matrix and a positionalvector for transformation of the coordinate system.

[0103] The label specifies the corresponding object and also specifiesthe necessary data for loading of the object and construction ofinter-object communication. A design label, or a virtual label havingthe description which is more general and easier to understand than adesign label, or a composite label constituted by combining a designlabel and a virtual label is applied. A visual label is replaced with adesign label by the design robot for use.

[0104] The following formula represents the description of the designlabel. The design label is constituted by one or more pieces ofconstituent element information (CPC primitive location information) ora design label (Design Label). Design Label ( CPC Primitive LocationInformation or Design Label; ...... ) ... (1)

[0105] On the other hand, the following formula represents thedescription of the virtual label (Virtual Label). The virtual label isconstituted by a design label (Design Label), a constituent element (CPCPrimitive), and position information (CPC Coordinate Locator) of theconstituent element (CPC Primitive). Virtual Label ( Design Label: CPCPrimitive: CPC Coordinate Locator: ) ... (2)

[0106] The following formula represents the description of the compositelabel (Composite Label). Composite Label ( Composite Label; or/andDesign Label: or/and Virtual Label; ) ... (3)

[0107] In this case, if there exits the position information (CPCcoordinate locator) defined within the virtual label on the distal endside of the tree structure from the specified position information (CPCcoordinate locator) in the constituent element information (CPCprimitive location information) specified by the connection information(CPC connection information) sent to the design robot, the design robotreplaces the virtual label with the design label and sets such a designlabel to be effective.

[0108] Thus, by accessing the design file in accordance with theconnection information (CPC connection information), the current form(such as the four-legged type and the wheeled type) of the robot devicecan be specified and various data necessary for updating theform-dependent software can be acquired.

[0109]FIG. 7 is a flowchart showing the specific processing procedure ofthe design robot. When the design robot is notified of connectioninformation (CPC connection information) from the virtual robot, theprocessing shifts from step SP1 to step SP2 to access the design file inaccordance with the connection information (CPC connection information),thus specifying the current form of the robot device 1.

[0110] Then, the processing at the design robot shifts to step SP3 tocompare the constituent element information (CPC primitive locationinformation) based on the connection information (CPC connectioninformation) sent from the virtual robot with the constituent elementinformation (CPC primitive location information) based on the connectioninformation (CPC connection information) held in the design file.

[0111] The processing at the design robot shifts to step SP4. The designfile is accessed on the basis of the result of the comparison and adesign label is detected which specifies an object corresponding to thecurrent form and necessary data for reconstructing inter-objectcommunication.

[0112] Then, the processing at the design robot shifts to step SP5. Aconnection file is accessed in accordance with the detected design labeland the connection information corresponding to the label is detected,thereby acquiring necessary data for specifying the corresponding objectand for reconstructing inter-object communication. In this case, theconnection file is a file in which the connection information(connection data) is recorded in association with the label. Theconnection information (connection data) is necessary data forspecifying the corresponding object and for reconstructing inter-objectcommunication.

[0113] The processing at the design robot shifts to step SP6. Theconnection information (connection data) is sent to the object manager,thus instructing the object manager to update the form-dependentsoftware. After that, the processing shifts to step SP7 to end thisprocessing procedure.

[0114]FIG. 8 is a chart showing the description of a part of the designfile. In this design file, “DRX” is the description to represent theform of the robot device 1 and 4Legged is the description to representthe form of the four-legged type. “Head,” “RightFrontLeg,”“LeftFrontLeg,” “RightRearLeg,” and “LeftRearLeg” represents a headpart, a right front leg, a left front leg, a right rear leg, and a leftreal leg, respectively. Thus, the first sentence specifies that thefour-legged type includes a head part, a right front leg, a left frontleg, a right rear leg, and a left rear leg.

[0115] “Wheel” in the second sentence represents the wheeled type.Compared with the first sentence, the second sentence specifies that thewheeled type includes a head part, a right front leg, a left front leg,a right rear wheel, and a left rear wheel. The third sentence describesthe arrangement of camera link in the head part. The fourth sentencedescribes a virtual label of the camera link. The fifth and subsequentsentences describe the position information (CPC coordinate locator) forthe right front leg, the left front leg and the like in a tree format.

[0116]FIG. 9 is a chart showing the description of a part of theconnection information (CPC connection information). In this embodiment,the connection information, too, is described in a text data formatsimilar to the design file. In this description, “Joint” represents aninterface, indicating that this portion is a connection site withanother constituent element. In this case, it can be learned from thedescription of the second to fifth rows that a television camera isconnected via five hubs or the like which are expressed as CO, CO, CO,CO, CO.

[0117] The connection information (CPC connection information) in theexample of FIG. 9 coincides with the four-legged type, which isdescribed above with reference to FIG.8.

[0118] On the other hand, the following formula represents thedescription of a part of the connection file. The connection file isdescribed in a text data format. In this description, the first sentenceand second sentence describe the objects corresponding to the legs ofthe four-legged type and the wheels of the wheeled type, respectively,and necessary data for constructing inter-object communication for theseobjects.

[0119] Specifically, in the first sentence, an object name “MoNet” as aservice name, a data format “MoNetOutData,” and “S” representing asubject are described. Moreover, an object name “MoNetReplay” as asimilar service name, a data format “MoNetOutData” and the like aredescribed. Finally, the description of “O” representing an observer isallocated. Similarly, a subject, an observer, a data format and the likeare described in the subsequent row. DRX 4Legged (MoNet.MoNetOutData..S, MoNetReplay.MoNetOutData...OMoNet.MoNetOutData..S, WalkingPatternGenerator.MoNetOutData...O ) DRXWheel ( MotionConverter.MCData..S, MotionReplay2.MCData...OMotionConverter.MCData..D,Wheel.MCData...O )

[0120] Thus, in the case of FIG. 8, the design robot extracts theconnection information (connection data) (description in parenthesesafter DRX 4Legged)from the description of the first sentence based onDRX 4Legged, and notifies the object manager of the connectioninformation, thereby updating the form-dependent software.

[0121]FIG. 10 is a time chart showing the processing at the objectmanager, the virtual robot and the design robot at the time of boot.When the power of the robot device 1 is turned on or the robot device 1is reset, the boot processing is started. At this point, in the robotdevice 1, each object is loaded from the file to construct theform-dependent software, and the internal variable of each objectmanager is initialized.

[0122] Then, a do-initialize command (DoInit) is sent from the objectmanager to each object, and a query entry of each object is registeredto the object manager or the like in accordance with the DoInit command.Thus, each inter-object communication is constructed on the robot systemsoftware layer.

[0123] Then, a DoStart command is sequentially sent to the virtual robotand the design robot from the object manager, and the virtual robot andthe design robot start the operation. The virtual robot generatesconnection information (CPC connection information), and in response toa request from the design robot, this connection information (CPCconnection information) is sent to the design robot, which generatesconnection information (connection data). Moreover, the connectioninformation (connection data) is sent to the object manager and theform-dependent software is constructed by this connection information(connection data).

[0124] At the time of shutdown, a DoStop command is sent to each objectfrom the object manager. In accordance with this DoStop command, eachobject issues an error with respect to all requests and stops theoperation. Subsequently, a DoDestroy command is sent to each object fromthe object manager. Accordingly, each object opens the source which hasbeen used, and deletes the entry registered to the object manager. Then,each object enters the standby state.

[0125] Thus, even if the robot device 1 is booted with its form changed,it can operate by using the software suitable for the changed form.

[0126] Meanwhile, at the time of so-called plug-in and plug-out, aDoStop command is sent to each object from the object manager, and inaccordance with this DoStop command, each object issues an error withrespect to all requests and stops the operation, as shown in FIG. 11.

[0127] Then, similarly to the case of boot, a DoStart command issequentially sent to the virtual robot and the design robot from theobject manager. The virtual robot generates connection information (CPCconnection information), and this connection information (CPC connectioninformation) is sent to the design robot, which generates connectioninformation (connection data). The form-dependent software isconstructed by this connection information (connection data).

[0128] Thus, even if the form is dynamically changed by plug-in orplug-out, the robot device 1 can operate by using the software suitablefor the changed form.

[0129] If the battery 17 is used up, the processing in accordance with aDoStop command and a DoStart command, similar to the case of plug-in orplug-out, is repeated in response to a slate change request from thebattery manager. Thus, if the battery 17 is used up, the clock frequencyis reduced and the operations of unnecessary devices are stopped, thuschanging the state so that the robot device operates by using the buttonbattery 29. On the other hand, if a charged battery 17 is loaded, theclock frequency is increased and the operation of each device is startedso that the robot device operates by using the battery 17.

[0130] (1-4) Processing at Object Manager

[0131] The object manager reconstructs objects constituting theform-dependent software in accordance with the notification from thedesign robot which is executed as described above, and thus updates theform-dependent software. Specifically, the object manager loads orunloads the objects in accordance with the notification from the designrobot and reconstructs inter-object communication corresponding to theloading and unloading, thus changing the form-dependent software.

[0132] When constructing this inter-object communication, if thecorresponding object names have to be registered to the objects, theindependence of the respective objects is hindered and a plurality oftypes of objects must be prepared so as to correspond to free forms.Therefore, in this embodiment, the object manager constructsinter-object communication on the basis of the connection information(connection data) outputted from the design robot and thus secures theindependence of the objects. In the following description, specifying aparticular object name in the robot device 1 will be avoided forsimplifying the explanation. The inter-object communication is carriedout asynchronously.

[0133]FIG. 12 is a diagram showing the basic structure of inter-objectcommunication between two objects in this embodiment. In thisembodiment, the inter-object communication is carried out by using aReady signal and a Notify signal, so that transmission of the data whichexceeds the processing ability of the object (in this example, object B)is prevented.

[0134] In FIG. 12, an object A sends data from a subject of a class 0,which is a member of the object A, to a 0 observer class, which is amember of an object B, thus invoking the method of the object B. Thesubject and the observer referred to in this case constitute so-calledsurrogate programs in the objects to which they belong.

[0135] In such a relation, the subject sends data only when a Readysignal is being sent from the observer. A Ready signal must be sent oncefor each transmission of data. Thus, the object B on the observer sidecan wait for the completion of the processing of received data and thenreceive the subsequent data.

[0136] By thus using a Ready signal and a Notify signal, theinter-object communication is carried out. According to this invention,the inter-object communication is realized as the transmitting side andthe receiving side share data on a shared memory.

[0137]FIG. 13 is a diagram showing the basic structure of inter-objectcommunication in a multi-observer environment. In this case, an objectA, which is a subject, can distribute data to all the observers and canalso distribute data to a specific observer alone that is specified bythe object ID. In this embodiment, again, data is sent to thecorresponding observer in response to a Ready signal in such amulti-observer environment.

[0138] Each object designates the object ID specifying the object andthe selector number (that is, method number) specifying the method,thereby starting (entry of) the corresponding method. Then, each objectspecifies an observer and sends desired data thereto.

[0139]FIG. 14 is a diagram showing the basic structure of inter-objectcommunication is a so-called multi-subject environment. In this case,objects A and B are subjects and an object C is an observer. Theobserver can receive data from a plurality of subjects, and has itsmethod for processing data invoked every time data is received.Moreover, the observer can send a Ready signal only a specific subjectspecified by the subject ID and thus can selectively input desired data.

[0140] In this embodiment, at least an object belonging to theform-dependent software layer can carry out inter-object communicationby using a Ready signal and a Notify signal as described with referenceto FIGS. 12 to 14, and also can connect to another object in accordancewith a multi-observer or multi-subject connection form, when necessary.That is, an object having a plurality of observers has connectionentries of the number corresponding to the number of the plurality ofobservers.

[0141]FIG. 15 is a diagram showing the relation between the objectmanager and respective objects. Each of The objects specifies a methodin accordance with the object ID and the selector number and thenexchanges data. Each of the objects has the selector numbers 0 to 3allocated to the basic methods, irrespective of the correspondingsubject and observer.

[0142] A do-initialize (DoInit) command is assigned to the selectornumber 0 and each object is initialized by starting this DoInit command.A DoStart command is assigned to the selector number 1 and each objectis caused to start the operation by starting this DoStart command. ADoStop command is assigned to the selector number 2 and each object iscaused to stop the operation by starting this DoStop command. ADoDestroy command is assigned to the selector number 3 and each objectis caused to open the resource by this DoDestroy command.

[0143] Moreover, in response to these requests from the object manageror in response to a request from another object, each object properlysends the service name, the selector number and the like of the observerby using a return value.

[0144] Thus, after the objects are loaded or unloaded by the objectmanager on the basis of the connection information (connection data)sent from the design robot, the inter-object communication can bereconstructed.

[0145] The following formula represents the connection information(connection data) sent from the design robot. The service name of thesubject and the service name of the observer are described in a textdata format with a comma between them. On the subject side, the objectname “FooB,” the data format “Image,” the corresponding constituentelement name “RightCamera,” and “S” indicating the subject are describedas the service name. On the observer side, the object name “FooA,” thedata format “Image,” the corresponding constituent element name“RightCamera,” and “O” indicating the observer are described as theservice name.

FooB.Image.RightCamera.S, FooA.Image.RightCamera.O   (5)

[0146] When loading an object, the object manager detects the objectname of the object to be loaded from the description of this connectioninformation (connection data).

[0147] Moreover, the object manager secures a stack memory and a heapmemory and loads the object of the detected object name from apredetermined file. In this case, the object manager acquires the objectID from the operating system (OS) and records this object ID togetherwith the object name described in the connection information (connectiondata).

[0148] Thus, the object manager executes the following DoInit,DoConnect, DoStart processing and the like by using the object IDregistered in the above-described manner.

[0149] In the DoInit processing, on the basis of the acquired object IDand the above-described selector number, the object manager calls aDoInit command with respect to all the objects acquired by loading tileobjects. The objects have their respective internal variablesinitialized in accordance with the DoInit command, and the objectmanager thus initializes the respective objects.

[0150] In this initialization processing, the object manager registersan entry (Control) as a subject of each object and an entry (Connect) asan object in accordance with the notification from each object. The nameof the object and the names of the subject and object are registeredcorrespondingly to the description of the subject and object in theconnection information (connection data).

[0151] In the DoConnect processing, on the basis of the registration inthe DoInit processing, the object manager gives a notification of thesubject ID (object ID) and the entry (Control) of the subject as aregistration target, to the entry (Connect) of each object having anobserver. The object, on receiving the notification, accesses thecorresponding subject by using the subject ID and the entry (Control)provided in the notification, and the connection of an entry (Notify) isregistered. A Ready signal is returned to the observer from the subjectfor which the connection registration is requested, and the observer andthe corresponding subject are thus connected with each other.

[0152] In constructing the inter-object communication between theobserver and the subject, the object manager gives a notification of thesubject ID (object ID) and the entry (Control) of the correspondingsubject, to the observer notified of in tile connection information(connection data). Therefore, each object can develop any object as aconnection target without explicitly showing it, and also can connect tovarious objects in accordance with instructions from the object manager,when necessary. Thus, higher independence can be secured than in theconventional technique.

[0153] In this case, as the object manager constructs the inter-objectcommunication in accordance with the connection information (connectiondata), the form-dependent software is updated easily and freely, thusenabling easy change of the software in accordance with the form.

[0154] In the DoStart processing, the object manager sends a DoStartcommand to each object by using the above-described selector number 1.Each object, if it has an observer, sends a Ready signal to the subjectby using the subject ID acquired by the DoConnect processing and anentry (Ready). Thus, the state in which data can be received from thecorresponding subject is formed and the form-dependent software startthe operation.

[0155] That is, the subject in the multi-observer environment gives anotification of data, for example, a sensor output, to the observerwhich is sending a Ready signal, of the registered observers. Theobserver completes the processing of the received data and sends a Readysignal when it can receive the next data.

[0156] In the above-described cases of shutdown, plug-in, plug-out, andstate change, the connection information (connection data) sent from thedesign robot differs from the contents which were previously sent andregistered from the design robot. Therefore, the object manager sends aDoStop command to each object by using the above-described selectornumber 2. In this case, the observer cancels the entry (Ready).

[0157] In the DoDisconnect processing, the object manager shuts down thecommunication connection between the subject and the observer. In thiscase, the object manager sends a DoDisconnect message to the entry(Connect) of the observer, then causes the observer to issue adisconnection request (Remove Observer) of the entry (Control) to thesubject, and thus shuts down the communication connection.

[0158] In the DoDestroy processing, the object manager sends a DoDestroycommand to the corresponding object by using the above-describedselector number 3 and thus destroys the object. In this case, the objectcancels the registration which was carried out in the DoInit processing.

[0159] In the Object Unload processing, the object manager opens theareas of the stack memory and the heap memory with respect to the objectdestroyed by the DoDestroy processing and unloads this object. Theobject manager also deletes the subject ID and the subject name whichwere registered at the time of loading.

[0160] For example, on receiving the connection information (connectiondata) from the design robot, the object manager controls up to theDoStart processing by using the above-described control processing inaccordance with a sequence shown in FIG. 16.

[0161] Specifically, when the connection information (connection data)is sent to the object manager by a message, the object manager isstarted up and loads the object A and the object B described in thisconnection information. In this case, the object manager loads theobject A and the object B in accordance with a system command of theoperating system. At this point, the object manager acquires andregisters the object IDs of the objects A and B.

[0162] Then, the object manager starts the DoInit processing of theobjects A and B in accordance with the observer ID acquired as describedabove and the selector number 0, and thus acquires and registers anentry (Control) as a subject and an entry (Connect) as an object fromthe objects A and B.

[0163] Subsequently, the object manager starts the DoConnect processingof the object A, which is an observer, by using the registered entry(Connect), and connects the object B, which is a subject, to the objectA. The inter-object connection is thus constructed on the basis of theconnection information (connection data) and the object manager startsthe DoStart processing of the objects A and B.

[0164]FIG. 17 is a time chart showing the sequence after the DoStartprocessing. When the object A, the object B and other objects arestarted up by the DoStart processing at the object manager, theseobjects carry out the inter-object communications using theabove-described Ready and Notify messages.

[0165] In this case, the start-up causes the object A to send a Readymessage to a Ready entry of the object B, and a Notify entry of theobject A by the object B causes data to be sent to the object A from theobject B. If no message is sent to the Ready entry of the object B fromthe object A during the processing of this data, the Notify entry of theobject A by the object B is registered and a Ready entry of the object Bby the object A causes data to be sent. Thus, in this inter-objectcommunication, transmission of data which exceeds the data processingability of the object A is prevented.

[0166]FIG. 18 is a time chart showing the sequence at plug-in, plug-out,and state change. When the connection information (connection data) sentfrom the design robot differs from the contents which were previouslysent and registered from the design robot, the object manager sends aDoStop command to all the objects to stop the operations of all theobjects. In this case, the objects A and B cancel the Ready entries sothat their respective Notify entries will not be started thereafter.

[0167] On completion of the DoStop processing of all the objects, theobject manager in this case sends a DoDisconnect command to the object Ato disconnect the object A from the other objects and then starts theDoDestroy processing of the object A. The resource of the object A isthus opened and the registration of the object B carried out by theDoInit processing is canceled.

[0168] When the DoDestroy processing of the required object(s) iscompleted, the object manager executes the unloading in accordance witha system command of the operating system. The destructor of the requiredobject is accessed, that is, in this case, the destructor of the objectA is accessed, thereby canceling the registration of the object Acarried out at the time of loading. Moreover, the object manager opensthe stack memory and the heap memory and thus completes the unloading ofthe object A.

[0169] Then, the object manager gives an instruction to load the objectC in accordance with the connection information (connection data), andsequentially starts the DoInit, DoConnect and DoStart processingsimilarly to the processing described above with reference to FIG. 16.Thus, during the operation, the structure constituted by the objects Aand B is changed to the structure constituted by the objects B and Cwithout compiling.

[0170] The connection of the objects for carrying out the inter-objectcommunication is described above with reference to FIGS. 12 to 18.Hereinafter, the essential parts of the embodiment of this inventionwill be described. This invention relates to inter-object (process)communication between objects (processes) and is adapted for realizingsmooth inter-object communication.

[0171] As described above, the inter-object communication, that is, theinput and output of data at the respective objects, are managed byso-called surrogate programs such as the object and the observer. Sincedata communication between the respective objects is realized bycarrying out the predetermined procedure between the subject and theobserver, as described above, the design of the structure between therespective objects is easily realized.

[0172] In general, the inter-object communication assumes that therespective objects operate in different memory spaces. Therefore, it isconsidered that the inter-object communication is realized by atechnique in which data is copied from the object on the transmittingside to the object on the receiving side over the different memoryspaces, or by a technique in which data is arranged on a shared memorywhich can be referred to from the respective objects (memory spaces).

[0173] On the assumption of the technique in which data is copied overthe memory spaces, though the processing is easy, copying must becarried out at least twice, for example, copying from the observer tothe subject and copying from the subject to the object. Moreover, thistechnique is disadvantageous to the case where the copy target is largedata because the number of time of copying increases in proportion tothe number of connections.

[0174] On the assumption of the technique in which a shared memory isused by the objects, data must be copied only once to the shared memoryand an increase in the number of connections does not affect the numberof times of copying. Therefore, this technique has an advantage inperformance, compared with the foregoing technique.

[0175] However, even if it is assumed that a shared memory is used,since the content of data on the shared memory is the only one, the datamust be protected from the use (reference) by all the users if there area plurality of users (objects using the shared memory), and the datamust be protected from writing by one user. That is, since a pluralityof users use the data, rewriting of the data by one user must beprevented.

[0176] In such a case, it may be possible to cause each user (object) tocarry out management (reference management) of the data on the sharedmemory. However, causing the users to carry out reference management ofthe data and protection of the data is not only troublesome, but alsodangerous if the user fails in the processing and causes destruction ofthe data.

[0177] Therefore, this invention realizes management of the data on theshared memory without requiring the users (objects) to manage the data.Specifically, in the data management to which this invention is applied,the number of times of reference to the shared memory (the number ofreferences or the number of accesses) is measured, thereby managing thedata on the shared memory. For example, a technique of automaticallymeasuring the number of times of reference is proposed in “MoreEffective (C++),” Scott Mayer, Addison-Wesley Publisher, pp.175-205.This invention extends such a technique as a technique for managing thedata on the shared memory over different memory spaces.

[0178] First, the principle of measurement of the number of references(the number of times of reference), which is a value indicating a user(referrer) of the shared memory, will be described with reference toFIG. 19.

[0179] Each user (object) is permitted to access a shared memory M byacquiring a shared memory pointer (hereinafter simply referred to aspointer). Specifically, as shown in FIG. 19, the users who acquiredpointers P11, P12 and P13, respectively, are permitted to access a firstarea M1 of the shared memory. The users who acquired pointers P21 andP22, respectively, are permitted to access a second area M2 of theshared memory. The data in the first area M1 of the shared memory M isshared (referable) by the users who acquired the pointers P11, P12 andP13, respectively. The data in the second area M2 of the shared memoryis shared (referable) by the users who acquired the pointers P21 andP22, respectively.

[0180] In practice, as shown in FIG. 19, the permission of access(reference) to the respective areas based on the pointers P11, P12, P13,P21 and P22 is realized by holding the number of references (measured)by number-of-reference measuring objects RO1 and RO2. In this case, thenumber-of-reference measuring object is a number-of-access countingobject for controlling the accesses to the shared memory by a pluralityof objects on the basis of the number of pointers, which is the numberof accesses generated in accordance with the accesses to the sharedmemory M by the objects. It can also be considered that thenumber-of-reference measuring object is a communication managementobject for controlling the accesses to the shared memory M by aplurality of objects. Specifically, the number-of-reference measuringobject indicates the sole content on the shared memory and the number ofpointers acquired by (or allocated to) the users who are referring tothis content.

[0181] The number of references by the users to a predetermined area onthe shared memory is thus managed. For example, if the number ofreferences measured by the number-of-reference measuring object is twoor more, a plurality of users are accessing a predetermined area on theshared memory as indicated by the number-of-reference measuring object.If the number of references measured by the number-of-referencemeasuring object is zero, no users are accessing a predetermined area onthe shared memory as indicated by the number-of-reference measuringobject. As will be described later, if the number of references is zero,the number-of-reference measuring object is extinguished and the areawhich was indicated by the extinguished number-of-reference measuringobject is caused to be an unused area.

[0182] Referring to FIG. 20, the case of generating a pointer will nowbe described. In the case of generating a pointer, a shared memory isnewly generated (or an area is secured on the shared memory), that is,the shared memory is newly accessed by a user.

[0183] In the case of newly securing an area on the shared memory, apointer P31 used by a user is prepared and a number-of-referencemeasuring object RO3 corresponding to the pointer P31 is prepared, asshown in FIG. 20. The content indicated by the newly preparednumber-of-reference measuring object RO3 is allocated to an unused areaM3 on the shared memory M which is pooled by the system. Thus, the userwho acquired the pointer P31 indicated by the number-of-referencemeasuring object RO3 can use the area M3 indicated by thenumber-of-reference measuring object RO3.

[0184] For example, such securing of a new area is carried out in thecase where the new area is to be used as a data transmission bufferbetween objects in the inter-object communication. In this case, thepredetermined area M3 on the shared memory M in which data is to berecorded is automatically allocated as a transmission buffer usedbetween process communications in the inter-object communication. Bythus securing the new area M3, the data in the area M3 is made shareablebetween the objects, thus enabling the inter-object communication basedon the data shared by the objects of different memory spaces, as will bedescribed later.

[0185] Meanwhile, the case of extinguishing a pointer will now bedescribed. In the case of extinguishing a pointer, for example, theaccess to the shared memory M by a user is ended. In this case ofextinguishing a pointer, the processing differs between when thenumber-of-reference measuring object which is referred to by theextinguishing target pointer is referred to by another pointer and whenthat number-of-reference measuring object is not referred to by anyother pointer.

[0186] Specifically, as shown in FIG. 21, if a number-of-referencemeasuring object RO1 referred to by a pointer P11 which is to beextinguished is also referred to by other pointers P12 and P13, only thepointer P11 is extinguished. Then, the number of references measured bythe number-of-reference measuring object RO1 is changed from three totwo. Such a change in the number of references is equivalent to a changeof the number-of-reference measuring object RO1.

[0187] On the other hand, if a number-of-reference measuring object RO2is not referred to by any other pointer than a shared memory pointer P21which is to be extinguished, that is, if the number of referencesmeasured by the number-of-reference measuring object RO2 is one, thepointer P21 which is to be extinguished and the number-of-referencemeasuring object RO2 which is referred to by the pointer P21 areextinguished. Thus, an area M2 which was indicated by the extinguishednumber-of-reference measuring object RO2 is returned to the system andis then considered to be an unused area. Meanwhile, in theabove-described case where only the pointer P11 is extinguished, thearea M1 indicated by the number-of-reference measuring object RO1 isstill considered to be an area in use because the number of referencewith respect to the area is not less than one.

[0188] In accordance with the processing (behaviors of pointers) asdescribed above, if the number of references measured by thenumber-of-reference measuring object is not less than two, a pluralityof users are using (i.e., referring to) a predetermined area on theshared memory corresponding to the number-of-reference measuring object,and if the number of references in the case of extinguishing a pointer(i.e., ending the reference) is not less than two, thenumber-of-reference measuring object is maintained, thus enablingprotection of the use of (or reference to) the data by the other users.On the other hand, if the number of references measured by thenumber-of-reference measuring object is one, one user is using (i.e.,referring to) a predetermined area on the shared memory corresponding tothe number-of-reference measuring object, and the use of (or referenceto) the data need not be secured for the other users. Therefore, byextinguishing the number-of-reference measuring object together with thepointer, the predetermined area can be changed to an unused area.

[0189] Referring to FIG. 22, the case of duplicating data will now bedescribed. The duplication of data is achieved simply by changing thenumber-of-reference measuring object as the reference target (i.e.,increasing or decreasing the number of references). Specifically, asshown in FIG. 22, when duplicating data in a second area M2, if the datais to be duplicated for a new user, a new pointer P21 which refers to asecond number-of-reference measuring object RO2 indicating the secondarea M2 is generated. If the data is to be duplicated for a user who isaccessing another area (for example, a first area M1), the target ofreference by a pointer P13 of the user is changed to the secondnumber-of-reference measuring object RO2 indicating the second area M2.Thus, in this example, the number of references measured by the firstnumber-of-reference measuring object RO1 indicating the first area M1 isreduced from three to two, and the number of references measured by thesecond number-of-reference measuring object RO2 is increased from one tothree.

[0190] Referring to FIG. 23, the case of rewriting data recorded in apredetermined area on the shared memory will now be described. As shownin FIG. 23, if an area M2 in which data is to be rewritten is accessedonly by the user (referrer) who is to rewrite the data, that is, if thenumber of references measured by a number-of-reference measuring objectRO2 is one, free rewriting is permitted in the area M2 and therefore thedata in the area M2 is directly rewritten.

[0191] On the other hand, if an area Ml in which data is to be rewrittenis accessed by a plurality of users including the user who is to rewritethe data (that is, if the number of references measured by anumber-of-reference measuring object RO1 is not less than two),rewriting the data will destroy the data for the other users andtherefore an unused area M3 is allocated for rewriting. Specifically,the unused area M3 is allocated and rewriting of the data is carried outin accordance with the following processing procedure.

[0192] First, a new number-of-reference measuring object RO3 indicating(or allocated to) the unused area M3 is generated. Then, the target ofreference by a pointer P13 of the user who is to be rewrite the data ischanged to the newly generated number-of-reference measuring object RO3,and the data is newly written into the area M3 indicated by thenumber-of-reference measuring object RO3. In this case, the number ofreferences measured by the newly generated number-of-reference measuringobject RO3 is one and the number of references measured by the originalnumber-of-reference measuring object RO1 is reduced (in this example,from three to two).

[0193] In accordance with such processing procedure, when the area inwhich one user is to rewrite the data is accessed by the other users,the data is written into the new area and the rewriting of data by theone user is realized without destroying the data accessed by the otherusers.

[0194] The generation of a number-of-reference measuring object and thechange of a pointer to another number-of-reference measuring object asdescribed above are automatically carried out by a system (controlmeans) for monitoring the number of references measured by thenumber-of-reference measuring object. Therefore, the user who is torewrite the data can rewrite the data, irrespective of the processingsuch as the generation of a number-of-reference measuring object and thechange of a pointer to another number-of-reference measuring object(that is, without having to understand the processing).

[0195] Moreover, in rewriting the data, since the processing in the casewhere another user exists and the processing in the case where no otherusers exist are automatically carried out, the user who is to rewritethe data can rewrite the data without having to know which processing iscarried out. As the rewriting of the data is realized without the user(object) having to understand the processing contents in rewriting thedata, a program for executing such processing contents need not beincorporated in the object design.

[0196] The behavior of the pointer (reference management) for thegeneration, extinction and change (increase/decrease in the number ofreferences measured) of the number-of-reference measuring objectcorresponding to the various processing is described above. Thereference management carried out over memory spaces will now bedescribed. Specifically, in this case, respective objects exist indifferent memory spaces and a shared memory is accessed by these objects(users).

[0197] First, the processing procedure in transferring data from anobject A (memory space A) to an object B (memory space B) will bedescribed with reference to FIG. 24.

[0198] A user acquires a pointer P1, and by using the pointer P1, theuser writes data which the user wants to transmit, into an areacorresponding to the pointer P1. In this case, the area corresponding tothe pointer P1 is an area M1 indicated by a number-of-referencemeasuring object RO1 which the pointer P1 refers to. By doing so, thebehavior of the pointer enables realization of secure writing of data.

[0199] Next, the pointer P1 acquired for transmitting this data ishanded to a subject of the object B, which is a surrogate program(transmission agent). Having received the pointer P1, the subjectprepares a duplicate of the pointer P1 and a notification of theduplicate is sent to the object B (i.e., message passing is carriedout). In this case, for example, the notification of the duplicate issent to the object B together with attribute data including the ID ofthe shared memory or the like. Such message passing between theso-called subject and observer is realized by using a Notify messagefrom the subject as described above, and is realized by the function(message communication function) to send a message accessing the sharedmemory M between information processing processes constructed indifferent memory spaces. Since the duplicate of the pointer P1 isprepared by the subject, one is added to the number of referencesmeasured by the number-of-reference measuring object RO1 on thetransmitting side. In this example, as shown in FIG. 24, the number ofreferences measured by the number-of-reference measuring object RO1 isincreased from three to four by the generation of the duplicate pointerP1.

[0200] On the other hand, the observer, as a surrogate program(reception agent) of the object B on the receiving side, receives thenotification from the subject and stores a pointer P11. Moreover, on thebasis of the ID of the shared memory or the like sent together with thepointer P11, the observer attaches to a memory M1 on the shared memory Mindicated by the number-of-reference measuring object RO1 which theoriginal pointer P1 of the pointer P11 refers to, from the memory spaceB side, by using a newly generated number-of-reference measuring objectRO2. Then, the observer prepares a pointer P2 for referring to the areaM1 on the memory space B side in response to a request from the user(object B), and sends the pointer P2 to a number-of-reference measuringobject RO3. Thus, since the data in the area M1, which can be referredto by the object A, can also be referred to by the object B, theinter-object communication is practically realized between the object Aand the object B in the different memory spaces.

[0201] In the memory space on the object A side, since the pointer issent to and held by the object B and is counted as the number ofreferences by the number-of-reference measuring object RO1, the accessto the shared memory by the object A is carried out on the assumptionthat the shared memory is also accessed by the object B.

[0202] Referring to FIG. 25, the procedure for opening of data will nowbe described. The opening of data means opening of the shared state ofthe shared memory from the state where the object A and the object Bexist in the different memory spaces, respectively (as described withreference to FIG. 24).

[0203] On completion of the processing at the object B, a Ready messagefor requesting the next data is sent to the object A. In this case, inthe observer, the pointer P11 (pointer P2) received from the object A issought and it is checked whether the number of references measured bythe number-of-reference measuring object RO2 corresponding to the soughtpointer P11 is zero or not. If the number of references is zero, it isdetermined that the use at the object B is ended and the pointer P11 issent back to the object A (subject) (that is, message passing is carriedout). At the subject of the object A, the corresponding pointer P1 isextinguished on the basis of the normal behavior (normal processingprocedure). In this example, since the number of references measured bythe corresponding number-of-reference measuring object RO1 is reducedfrom one to zero in response to the extinction of the pointer P1, thenumber-of-reference measuring object RO1 is extinguished.

[0204] The data transfer processing and the like between the objects(users) existing in the different memory spaces are described above withreference to FIGS. 24 and 25. Hereinafter, so-called subletting of datato a third object will be described, which is realized by applying theprocessing procedure as described above. The subletting of data to athird object applies to such a case that when a predetermined area Ml onthe shared memory is shared by the objects A and B existing in differentmemory spaces, as shown in FIG. 24, further opening (sharing) of thedata to a third object is made possible. The processing procedure forthis so-called subletting of data to a third object can be basicallyachieved by combining the processing procedure of FIG. 24 (data transferprocessing) and FIG. 25 (data opening processing). This processingprocedure will now be described with reference to FIG. 26.

[0205] First, a user (object A (memory space A)) acquires a pointer P1,and by using the pointer P1, the user writes data which the user wantsto send, into a corresponding area M1 on the shared memory M. Next, thepointer P1 acquired for sending this data is handed to a subject of theobject A. Having received the pointer P1, the subject prepares duplicateof the pointer P1 and sends a notification of the duplicate to theobject B (i.e., message passing is carried out). In this case, forexample, the notification is sent to the object B together withattribute data including the ID of the shared memory.

[0206] An observer of the object B on the receiving side receives thenotification from the subject and stores a pointer P11. Moreover, on thebasis of the ID of the shared memory or the like sent together with thepointer P11, the observer attaches to the memory M1 on the shared memoryM indicated by the number-of-reference measuring object RO1 which theoriginal pointer P1 of the pointer P11 refers to, from the memory spaceB side, by using a newly generated number-of-reference measuring objectRO2. Then, the observer prepares a pointer P2 for referring to this areaon the memory space B side in response to a request from the user, andsends the pointer P2 to a number-of-reference measuring object RO3. Thenumber of references measured by the number-of-reference measuringobject RO1 is set to one. Thus, the result is equivalent to that thedata in the area M1 is received by the user (object B).

[0207] The object B sends the pointer P2 to the subject. Having receivedthe pointer P2, the subject prepares a duplicate of the pointer P2 andsends a notification of the duplicate to a third object C (memory spaceC) as a subletting counterpart (i.e., message passing is carried out).In this case, for example, the notification is sent to the object Ctogether with attribute data including the ID of the shared memory. Anobserver of the object C on the receiving side receives the notificationfrom the subject and stores a pointer P21. Through such processing, thenumber of references measured by the number-of-reference measuringobject is propagated when the data sublet to the third object C.Therefore, the data in the area M1 is protected even when the data issublet to the third object C.

[0208] When the use of the data (area) by the third object is ended, theprocessing to automatically send back the data (or open the data) iscarried out. The data opening processing is carried out as follows.

[0209] On completion of the processing at the object C, a Ready messagesfor requesting the next data is sent to the object B. In this case, inthe observer, the pointer P21 received from the object B is sought andit is checked whether the number of references measured by thecorresponding number-of-reference measuring object RO3 is zero or not.If the number of references is zero, it is determined that the use atthe object C is ended and the pointer P21 is sent back to the object B(that is, message passing is carried out). At the subject of the objectB, the corresponding pointer P2 is extinguished on the basis of thenormal behavior (normal processing procedure).

[0210] Moreover, a Ready message is sent from the object B (observer) tothe object A. In this case, in the observer, the pointer P11 receivedfrom the object A is sought and it is checked whether the number ofreferences measured by the corresponding number-of-reference measuringobject RO2 is zero or not. If the number of references is zero, thepointer P11 is sent back to the object A (that is, message passing iscarried out). At the subject of the object A, the corresponding pointerP1 is extinguished on the basis of the normal behavior (normalprocessing procedure).

[0211] In the above-described manner, the so-called data sublettingprocessing to the third subject is carried out. Through the processingas described above, the number of references measured by thenumber-of-reference measuring object is propagated when the data subletto the third object C. Therefore, the data in the area M1 is protectedeven when the data is sublet to the third object C.

[0212] According to the present invention, data can be sent from oneobject (subject) to a plurality of objects (observers) by using thepointers as described above. The case of sending data from an object Aon the transmitting side to a plurality of objects B and C on thereceiving side, as shown in FIG. 27, will now be described.

[0213] In the normal data transmission, if a user has not received atransmission enabling signal (Ready signal) from the receiving side whensending data to a subject which is a transmission surrogate program, theuser cannot send the data. Therefore, in this case, the data is annulledor a retransmission request is issued while the data is held. Theproceeding manner of the processing differs depending on the object onthe receiving side. Therefore, if the user holds the data and waitsuntil the reception is enabled, a transmission request must be issued toeach transfer destination (object (observer)). Conventionally, suchprocessing is carried out by the user who has the contents of the data.

[0214] According to the present invention, however, the data is writteninto the shared memory and processing (data management) is carried outwithin the subject. The specific processing procedure is taken asfollows.

[0215] As shown in FIG. 27, the user writes data into predetermined areaM1, M2, M3 on the shared memory M, and sends to a subject pointers P11,P12, P21, P22, P23 referring to the areas M1, M2, M3 in which data iswritten. On receiving the pointers P11, P12, P21, P22, P23, the subjectfirst attempts to send data to observers of the objects B and Ccorresponding to the respective pointers P11, P12, P21, P22, P23. Ifreception is enabled on the receiving side (observer), the subjectimmediately sends the data. That is, a pointer is generated by theobject on the receiving side and one is added to the number ofreferences measured by the corresponding number-of-reference measuringobject.

[0216] On the other hand, if reception is not enabled on the receivingside (observer), the subject enters a queue to every connectiondestination (receiving side). Then, when a Ready signal is received fromthe observer at which reception is enabled, the subject checks the queuefrom the observer which sent the Ready signal, and immediately sendsdata that is accumulated and should be sent to the object, if any.

[0217] Through the processing procedure as described above, the datatransmission processing from one object (subject) to a plurality ofobjects (observers) is carried out.

[0218] According to the present invention, even when the same data isused, the quantity of the received data and the receiving timing (forexample, processing cycle) can be varied in accordance with theapplication on the receiving side (object). An example of varying thereceiving timing for image data at each object will now be described.

[0219] In the following case, for example, image data is distributed toeach of image processing objects which have different image processingcontents such as an object for carrying out motion detection imageprocessing (hereinafter referred to as motion detection object) and anobject for recognizing a face image (hereinafter referred to as facerecognition object). The image data distribution processing in this caseis carried out by using pointers as described above and will not bedescribed further in detail.

[0220] For example, the motion detection object needs to receive onepicture of image data once every two frames, while the face recognitionobject may receive one picture of image data once every 30 frames.However, to which object (motion detection object or the facerecognition object) an image distribution object is connected at thetime of designing is not considered. On the assumption of theseconditions, the image distribution object sends image data to a subject(every frame subject) for every frame processing. The subject receivesparameters related to the quantity and synchronization of datatransmission from an observer which is connected at the time of start-upof the system or the like. The subject carries out subsequenttransmission in accordance with such parameters. Specifically, withrespect to the observer of the motion detection object, the subjectenters a queue in the data every other time, thereby carrying outtransmission every other time. For example, the image data of the frameduring the period when transmission is not carried out is annulledwithout carrying out any particular processing. Similarly, with respectto the observer of the face recognition object, the subject enters aqueue in the data sent from the user once every 30 times, thus carryingout transmission once every 30 times.

[0221] As described above, according to the present invention, even whenthe same data is used, the quantity of the received data and thereceiving timing (for example, processing cycle) can be varied inaccordance with the application on the receiving side (object). Sincesuch processing is realized by the subject and the object which aresurrogate programs, the object need not be designed on the assumption ofsuch processing and the independence of the object can be secured.

[0222] The features of the present invention which are adapted as theembodiment are described above with reference to FIGS. 19 to 27. Thepresent invention realizes smooth inter-object communication.Specifically, the following effects can be provided.

[0223] Since data transmission between objects is carried out by sharingdata on a shared memory, the inter-object communication can be carriedout at a high speed. Moreover, since data transmission between objectsis carried out by sharing data on a shared memory, the time required forcommunication can be kept constant irrespective of the quantity of data.

[0224] By managing data using a pointer indicating data on a sharedmemory, the management of data is facilitated and data can be managedfor every transmission destination. By managing data using a pointerindicating data on a shared memory, data can be distributed in acommunication cycle (processing cycle) in response to a request from anobject of transmission destination. Moreover, for every transmissiondestination, data which could not be acquired at a peak can be saved andcollectively sent.

[0225] On the receiving side, since the data cycle is stable even whenthe load on the CPU is varied, highly reliable signal processing is madepossible.

[0226] Since a reference management function is added to a pointerindicating a shared memory, that is, since a pointer is managed by anindependent number-of-reference measuring object, data protection (datamanagement) oil the shared memory can be carried out without making auser aware of it.

[0227] Moreover, since components associated with communication aremounted within a subject and an observer, that is, since processingassociated with communication is executed only by a subject and anobserver, the independence of a object having such subject and observeras software components is improved. Therefore, a communicationcounterpart in the inter-object communication can be dynamicallychanged.

[0228] As an operating system (OS) which realizes the processing asdescribed above, Aperios provided by Sony Corporation may be considered.However, the OS is not limited to this and any general multi-process OShaving the functions of message communication and shared memory may beemployed.

[0229] In the above-described embodiment, inter-object communication asthe essential part of the present invention is applied to a robotdevice. However, the present invention is not limited to thisembodiment. For example, the present invention can also be applied to adevice the operation of which is controlled by an object.

[0230] (2) Operation of Robot Device

[0231] The robot device 1 (FIG. 1)having the above-described structuretakes the four-legged type form by attaching legs as the moving unit 3to the body 2 and is driven by the motor attached to the legs so as towalk with the four legs. Alternatively, the robot device 1 takes thewheeled type form by attaching wheels instead of the rear legs and ismovable via the wheels.

[0232] In the robot device 1 (FIG. 2), on the basis of the outputs ofthe sensors arranged on the legs and the like as the robot components24, 25, 26 and the information acquired by various information acquiringmeans arranged on the head part 2A, a necessary control command isoutputted through the processing at the central processing unit 22, thuscontrolling the moving unit 3 and the like.

[0233] In the robot device 1 (FIGS. 3 and 4), the upper-layer softwareof object-oriented structure drives the various devices on the devicedriver layer, thus executing control of these devices. In such control,in the robot system software, which is on the upper layer than thedevice driver layer, the virtual robot detects the components connectedto the serial bus and notifies the design robot of the connectioninformation (CPC connection information) indicating what robot componentis connected in what order in the robot device 1 as a whole. Thus, inthe robot device 1, the current form is specified in accordance with thedevice connected to the serial bus and the control target constitutingthe current form is specified.

[0234] In the robot device 1, the software on the upper layer than therobot system software is updated in accordance with the connectioninformation (CPC connection information) and the overall operation iscontrolled by appropriate software suitable for the form.

[0235] In updating the software, the robot device 1 compares the designfile described by appending a label to the group of constituent elementinformation (CPC primitive location information) of the respectivecomponents for each form by the design robot of the robot systemsoftware, with the connection information (CPC connection information)notified of by the virtual robot, and selects an appropriate objectsuitable for the form, thus changing the form-dependent software basedon this object (FIGS. 7 and 8). Thus, in the robot device 1, theappropriate software suitable for the form can be easily changed and theoverall operation can be controlled.

[0236] Moreover, the upper-layer software is divided into theform-independent software which is independent of the form of the robotdevice and the form-dependent software which is dependent on the form,and only the form-dependent software is updated in the state where thedata handled in a format independent of the form by the form-independentsoftware is converted to a format corresponding to the form by theform-dependent software so as to be transmitted to and received from therobot system software. Thus, the software can be updated by simpleprocessing.

[0237] In this case, the virtual robot generates the constituent elementinformation (CPC primitive location information) using the descriptionin a text data format (FIGS. 8 and 9) and the design file is describedin a similar text data format. Therefore, it is easy to cope with thefuture increase of varying forms.

[0238] In the robot device 1, the updating of the software is carriedout as the object manager reconstructs the objects of the form-dependentsoftware. That is, the object manager is notified of the connectioninformation (connection data) giving an instruction to connect an objectsuitable for the current form, by the design robot at the start-up orthe like, and the object designated by the connection information(connection data) is loaded (FIG. 16).

[0239] After the loaded object is initialized, the object managerconnects a subject and an observer that data can be exchanged betweenthem, in accordance with the designation by the connection information(connection data). In the robot device 1, the form-dependent software isthus constructed by the object suitable for the form.

[0240] Therefore, in the robot device 1, each object can be designed andthe software can be constructed without considering any specificconnection target. By generating connection information (connectiondata) in accordance with the form, the software suitable for the formcan be easily constructed. Moreover, the software can be changed withoutre-compiling or re-linking. Therefore, in the robot device 1, theindependence of the object can be significantly improved, compared withthe conventional technique, and accordingly, the appropriate softwaresuitable for free changes of the form can be provided easily andquickly. The inter-object communication can also be constructed betweenone object and a plurality of objects by so setting the connectioninformation.

[0241] Since the connection information (connection data) is theinformation specifying the format of data to be communicated with asubject, the object manager can specify the corresponding object ID andselector number in accordance with the connection information(connection data) and easily construct the inter-object communication.

[0242] Since the design robot selects and provides connectioninformation from the design file having a plurality of pieces ofconnection information recorded therein to the object manager, it ispossible to easily construct the software corresponding to variousforms, when necessary, by so setting the design.

[0243] Moreover, since the connection information (connection data) isdescribed in a text data format, it can be easily changed in variousmanners.

[0244] Meanwhile, when the form of the robot device 1 is changed, thevirtual robot detects the change of the format and notifies the designrobot of connection information (CPC connection information) relating tothe changed form. The design robot compares this connection information(CPC connection information) with the design file and thus generatesconnection information (connection data) relating to the changed form.In accordance with the connection information (connection data), theobject manager unloads an object which has become unnecessary because ofthe change of the form, and loads an object which has become necessarybecause of the change of the form, thus reconstructing the objectsconstituting the form dependent software. Moreover, these objects areconnected to enable inter-object communication by The connectioninformation (connection data) and the form-dependent software is thusupdated.

[0245] Accordingly, in the robot device 1, while the form-independentsoftware and the like are operating, the form-dependent software can beupdated, when necessary, to construct the software suitable for theform. It is also possible to apply this change of the software toswitching of the power consumption mode. Moreover, the present inventionenables smooth inter-object communication and high-speed processing.

[0246] The robot device used as an embodiment of the present inventionis not limited to a device having an appearance as shown in FIG. 1. Forexample, the robot device 1 may also have an appearance/shape which ismore like that of a certain animal, as shown in FIG. 28. In the robotdevice 1 shown in FIG. 28, the parts corresponding to those in FIG. 1are denoted by the same numerals.

1. An information processing device comprising control means having aplurality of information processing processes and adapted for carryingout control processing based on inter-process communication carried outbetween the information processing processes, the control meanscontrolling accesses by the plurality of information processingprocesses to a shared memory shared by the plurality of informationprocessing processes and thus carrying out inter-process communication.2. The information processing device as claimed in claim 1, wherein theinformation processing processes are made up of programs prepared on thebasis of an object-oriented system.
 3. The information processing deviceas claimed in claim 1, wherein as the control means, in theinter-process communication, controls accesses by the plurality ofinformation processing processes to data in the same area on the sharedmemory, the data is shared by the plurality of information processes. 4.The information processing device as claimed in claim 3, wherein as thecontrol means, in the inter-process communication, automaticallyallocates the same area on the shared memory in which data is to berecorded, as a transmission buffer used for the inter-processcommunication.
 5. The information processing device as claimed in claim1, wherein the control means controls the accesses by the plurality ofinformation processing processes to the shared memory by using acommunication management process.
 6. The information processing deviceas claimed in claim 1, wherein the control means transmits a message foraccessing the shared memory by the information processing processesconstituted in different memory spaces, and controls the accesses to theshared memory by the plurality of information processing processes onthe basis of the message.
 7. The information processing device asclaimed in claim 1, wherein the control means controls the accesses tothe shared memory by the plurality of information processing processeson the basis of the number of accesses to the shared memory by theinformation processing processes.
 8. The information processing deviceas claimed in claim 7, wherein the control means generates pointers inaccordance with the accesses to the shared memory by the informationprocessing processes and controls the accesses to the shared memory bythe plurality of information processing processes on the basis of thenumber of pointers as the number of accesses.
 9. The informationprocessing device as claimed in claim 8, wherein the control means has anumber-of-access measuring process for measuring the number of accessesand enables dynamic change of a communication counterpart in theinter-process communication, and the control means controls the accessesto the shared memory by the plurality of information processingprocesses on the basis of the number of accesses measured by thenumber-of-access measuring process.
 10. The information processingdevice as claimed in claim 1, wherein the plurality of informationprocessing processes are constituted in different memory spaces,respectively, and the accesses to the shared memory by the plurality ofinformation processing processes are made over the different memoryspaces.
 11. The information processing device as claimed in claim 1,wherein the control means controls the access to the shared memory onthe basis of the processing cycle of the information processing processon the receiving side.
 12. The information processing device as claimedin claim 1, wherein the control means generates a queue for the accessto the shared memory on the basis of the load on the informationprocessing process on the receiving side, and controls the access to theshared memory in accordance with the queue.
 13. An informationprocessing method having a plurality of information processing processesand adapted for carrying out control processing based on inter-processcommunication carried out between the information processing processes,the information processing method comprising controlling accesses by theplurality of information processing processes to a shared memory sharedby the plurality of information processing processes and thus carryingout inter-process communication.
 14. A robot device comprising: outputmeans for expressing a motion; and control means having a plurality ofinformation processing processes and adapted for carrying out controlprocessing of the output means based on inter-process communicationcarried out between the information processing processes, the controlmeans controlling accesses by the plurality of information processingprocesses to a shared memory shared by the plurality of informationprocessing processes and thus carrying out inter-process communication.15. The robot device as claimed in claim 14, wherein the informationprocessing processes are made up of programs prepared on the basis of anobject-oriented system.
 16. The robot device as claimed in claim 14,wherein as the control means, in the inter-process communication,controls accesses by the plurality of information processing processesto data in the same area on the shared memory, the data is shared by theplurality of information processes.
 17. The robot device as claimed inclaim 16, wherein as the control means, in the inter-processcommunication, automatically allocates the same area on the sharedmemory in which data is to be recorded, as a transmission buffer usedfor the inter-process communication.
 18. The robot device as claimed inclaim 14, wherein the control means controls the accesses by theplurality of information processing processes to the shared memory byusing a communication management process.
 19. The robot device asclaimed in claim 14, wherein the control means transmits a message foraccessing the shared memory by the information processing processesconstituted in different memory spaces, and controls the accesses to theshared memory by the plurality of information processing processes onthe basis of the message.
 20. The robot device as claimed in claim 14,wherein the control means controls the accesses to the shared memory bythe plurality of information processing processes on the basis of thenumber of accesses to the shared memory by the information processingprocesses.
 21. The robot device as claimed in claim 20, wherein thecontrol means generates pointers in accordance with the accesses to theshared memory by the information processing processes and controls theaccesses to the shared memory by the plurality of information processingprocesses on the basis of the number of pointers as the number ofaccesses.
 22. The robot device as claimed in claim 21, wherein thecontrol means has a number-of-access measuring process for measuring thenumber of accesses and enables dynamic change of a communicationcounterpart in the inter-process communication, and the control meanscontrols the accesses to the shared memory by the plurality ofinformation processing processes on the basis of the number of accessesmeasured by the number-of-access measuring process.
 23. The robot deviceas claimed in claim 14, wherein the plurality of information processingprocesses are constituted in different memory spaces, respectively, andthe accesses to the shared memory by the plurality of informationprocessing processes are made over the different memory spaces.
 24. Therobot device as claimed in claim 14, wherein the control means controlsthe access to the shared memory on the basis of the processing cycle ofthe information processing process on the receiving side.
 25. The robotdevice as claimed in claim 14, wherein the control means generates aqueue for the access to the shared memory on the basis of the load onthe information processing process on the receiving side, and controlsthe access to the shared memory in accordance with the queue.